package com.university.evaluation.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.university.evaluation.entity.StudentScoreDetail;

import java.math.BigDecimal;
import java.util.List;

public interface StudentScoreDetailService extends IService<StudentScoreDetail> {

    // 根据学生ID和测评体系ID查询成绩明细
    List<StudentScoreDetail> findByStudentIdAndSystemId(Long studentId, Long systemId);

    // 根据测评体系ID和审核状态查询成绩明细
    List<StudentScoreDetail> findBySystemIdAndStatus(Long systemId, Integer status);

    // 提交成绩申请
    boolean submitScore(StudentScoreDetail scoreDetail);

    // 审核成绩申请
    boolean auditScore(Long id, Integer status, String comment, Long auditorId);

    // 批量导入成绩
    boolean batchImport(List<StudentScoreDetail> scoreList);

    // 批量导入成绩（文件）
    java.util.List<StudentScoreDetail> batchImport(org.springframework.web.multipart.MultipartFile file) throws Exception;

    // 更新成绩
    boolean updateScore(Long id, BigDecimal score, String evidenceUrl);

    // 查询待审核的成绩申请数量
    int countPendingAudit(Long systemId);

    // 根据项目ID查询成绩明细
    List<StudentScoreDetail> findByItemId(Long itemId);

}